<template>
  <div>
    <p>这是App根组件</p>
    <hr>
  </div>
  
  <my-count @countChange="getChange"></my-count>
</template>

<script>
import MyCount from './count.vue'
export default {
  name:'MyApp',
  components:{
    MyCount,
  },
  methods:{
    // 监听自定义事件 val传参最新的值this.count
    getChange(val){
      console.log('监听自定义事件',val);
    }
  }
}
</script>

<style lang="less" scoped>

</style>